﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="ViewSubject.aspx.cs" Inherits="Xiaov.SmartWeb.Application.PluginSrc.GuestBook.ViewSubject" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link rel="stylesheet" type="text/css" href="/Resources/xiaovcn/css/xiaov-bbs.css"/>
    <script src="/Resources/xheditor-1.1.14/xheditor-1.1.14-zh-cn.min.js" type="text/javascript"></script>  
    <script type="text/javascript" src="/Resources/xiaovcn/scripts/usercheck.js"></script>
    <script>
        $(document).ready(function () {
            $('#t_content').xheditor({ tools: 'full', upLinkUrl: "/Resources/xheditor-1.1.14/demo/upload.aspx", upLinkExt: "zip,rar,txt,pdf,docx,doc,xls,xlsc", upImgUrl: "/Resources/xheditor-1.1.14/demo/upload.aspx", upImgExt: "jpg,jpeg,gif,png" });            
        });        

        function showreply() {
            $('#p_reply').panel('open');
        }
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="nav"  style="padding-bottom:5px;"><a href="SubjectList.aspx" class="easyui-linkbutton" iconCls="icon-undo">返回信息列表</a></div>
    <div id="p" class="easyui-panel" iconCls="icon-applicationgo" data-options="maximizable:true" title="[ <%=Subject.TCLASS %> ] <%=Subject.TITLE %>" style="padding:10px;">
       
        <div class="xiaov-bbs-header"> <%=Subject.AUTHOR %> 发布于 <%=Subject.PUBDATE.ToString() %></div>        
        <div class="xiaov-bbs-content"><%=Subject.CONTENT %></div>
        <div class="xiaov-bbs-manage">操作：
            <a href="NewSubJect.aspx?id=<%= Subject.ID%>" class="easyui-linkbutton" 
                data-options="disabled:<%=(!Permissions[1].Allow).ToString().ToLower() %>">编辑</a> / 
            <a href="NewSubJect.aspx?id=<%= Subject.ID%>" class="easyui-linkbutton"
                data-options="disabled:<%=(!Permissions[2].Allow).ToString().ToLower() %>">置顶</a> / 
            <a href="DeleteSubJect.aspx?id=<%= Subject.ID%>" class="easyui-linkbutton" onclick="return confirm('确定要删除这个主题吗？评论将被一起删除')" 
                data-options="disabled:<%=(!Permissions[2].Allow).ToString().ToLower() %>">删除</a> / 
            <a href="#p_reply" class="easyui-linkbutton" onclick="showreply()" 
                data-options="disabled:<%=(!Permissions[1].Allow).ToString().ToLower() %>">评论</a>
        </div>
          <%if (Comments.Count>0){ %>
        <div  style="padding-top:10px;  " id="replypanel">
        <% int i =1; %>
        <%foreach (var q in Comments)
          {
        %>
                <div class="xiaov-bbs-header">[ <%=i %>楼# ] <%=q.REPLYAUTHOR %> 在 <%=q.REPLYTIME.ToString() %>  评论 ：</div>
                <div class="xiaov-bbs-content"><%=q.REPLYCONTENT %></div>
          <% 
              i++;
          }
          %>
          
    </div>    
    <%} %>
    <div>
        <div  class="easyui-panel" title=" 评论主题：[ <%=Subject.TCLASS %> ] <%=Subject.TITLE %>" style="padding:10px; border-top:none; border-top:none;" id="p_reply" closed="true">
            <asp:TextBox id="t_content" TextMode="MultiLine" runat="server"  ClientIDMode="Static"  Width="502" Height="300"></asp:TextBox>  
            <div style="padding-top:5px;">
             <asp:LinkButton ID="btn_Reply" CssClass="easyui-linkbutton" iconCls="icon-redo" runat="server" OnClick="btn_Reply_Click">评论</asp:LinkButton>      </div>    
        </div>
    </div>
    </div>
   <script>
       $('#p').panel({ height: userScreenHeight-5 });
        </script>
</asp:Content>
